﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using Model;

namespace LogisticsDAL
{
    public class TruckDispathDAL
    {
        /// <summary>
        /// 调度人物信息表
        /// </summary>
        /// <returns></returns>
        public DataTable TruckDisacth(int pageIndex,int pageSize,out int count)
        {
            //string sqlproc = "p_Carries_Dispatch";
            string TableName = "Carriers";
            string pramary = "CarriesID";
            string Filed = "FinishedState=0";
            return PROC_Helper.Paging(TableName, pramary, pageIndex, pageSize, Filed, out count);
        }


        /// <summary>
        /// 调度车辆表
        /// </summary>
        /// <returns></returns>
        public DataTable Distach_TruckS(int pageIndex, int pageSize, out int count)
        {
            string TableName = "View_DispathTruck";
            string pramary = "TruckID";
            string Filed = "State=0";
            return PROC_Helper.Paging(TableName, pramary, pageIndex, pageSize, Filed, out count);
        }
    }
}
